#ifndef NODE_H
#define NODE_H

namespace zbp
{
	template <class T>
	class Node
	{
	public:
		int index;
		T* content;

		Node()
		{
			this->content = NULL;
		}
	
		Node(int index)
		{
			this->index = index;
			this->content = NULL;
		}

		Node(int index, T content)
		{
			this->index = index;		
			this->content = new T(content);
		}

		Node(const Node<T> &arg)
		{
			this->index = arg.index;
		
			if (arg.content != NULL)
			{
				this->content = new T(*arg.content);
			}
			else
			{
				this->content = NULL;
			}
		}

		~Node() 
		{
			if (this->content != NULL)
			{
				delete this->content;
			}
		}
	};
}

#endif